-
Notifications
You must be signed in to change notification settings - Fork 0
Chore: add CI workflow for lint, test, build #47
Conversation
Runs lint, format check, tests and build on every pull request to main and on pushes to main, so broken code is caught before review. Uses npm ci to match the lockfile, caches dependencies and cancels outdated runs to save runner time. Refs #45
Vitest exits with code 1 when it finds no tests, which made the CI test step fail before any tests exist. Adds --passWithNoTests as a temporary measure. Refs #45
Adds format check and build steps so formatting and type errors are caught before review. Limits triggers to pull requests and pushes to main to avoid duplicate runs, caches npm dependencies and cancels outdated runs to save runner time. Refs #45
|
@asgeija is there now a branch ruleset with status check requirement? |
|
@asgeija maybe look into changing the prettier format from a simple check to a more sophisticated solution where the runner automatically commits the prettier formatting. Removes one less tedious task from out backs, and also results in more status checks passed. Making the CI more streamlined. |
Not yet. If we want to, the status check can only be selected after it has run once, |
Thanks, but I'd rather not have the runner commit. A new commit |
Applies the Prettier config to files that did not follow it, mainly the ESLint and Vite configs, so the CI format check passes. Also aligns markdown tables and spacing in AGENTS.md and CONTRIBUTING.md. No behavior changes.
Runs Prettier on files that came in with the submit sighting form and the unit tests, so the CI format check passes. No behavior changes.
Unit tests now exist on main, so CI should fail if no tests are found instead of passing silently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good, ready to merge.
There is now a ruleset on main that requires the checks job |
Runs lint, format check, tests and build on every pull request to main and on pushes to main, so broken code is caught before review.
Uses npm ci to match the lockfile, caches dependencies and cancels outdated runs to save runner time.
Refs #45